package com.neusoft.ysu.populationmanagement.mapper;

import com.neusoft.ysu.populationmanagement.entity.CommonResult;
import com.neusoft.ysu.populationmanagement.entity.FloPop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.ysu.populationmanagement.entity.ResPop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 作者：赵子鉴
 * @since 2024-06-18
 */
@Mapper
public interface FloPopMapper extends BaseMapper<FloPop> {
    @Update("update flo_pop set " +
            "livedate=#{livedate}," +
            "livereason=#{livereason}," +
            "liveaddress=#{liveaddress}," +
            "is_delete=#{isDelete} " +
            "where pop_id=#{popId} AND is_delete=0")
    int updateByPopId(FloPop floPop);
    @Select("select * from flo_pop where pop_id=#{popId} AND is_delete=0")
    List<FloPop> selectByPopId(Long pop_id);

    int insertFloPopList(@Param("list") List<FloPop> floPopList);

}
